//
//  ResumeModel.m
//  MyProject
//
//  Created by jiaming yan on 2018/4/19.
//  Copyright © 2018年 yanjiaming. All rights reserved.
//

#import "ResumeModel.h"
NSString *const kRootClassBirthday = @"birthday";
NSString *const kRootClassCandidateState = @"candidateState";
NSString *const kRootClassCandidateStateName = @"candidateStateName";
NSString *const kRootClassMaxEducation = @"maxEducation";
NSString *const kRootClassMaxEducationName = @"maxEducationName";
NSString *const kRootClassName = @"name";
NSString *const kRootClassRegion = @"region";
NSString *const kRootClassRegionName = @"regionName";
NSString *const kRootClassResumeId = @"resumeId";
NSString *const kRootClassSeltDescription = @"seltDescription";
NSString *const kRootClassSex = @"sex";
NSString *const kRootClassWorkYear = @"workYear";
@implementation ResumeModel
-(instancetype)initWithDic:(NSDictionary *)dictionary
{
    self = [super init];
    if(![dictionary[kRootClassBirthday] isKindOfClass:[NSNull class]]){
        self.birthday = dictionary[kRootClassBirthday];
    }
    if(![dictionary[kRootClassCandidateState] isKindOfClass:[NSNull class]]){
        self.candidateState = [dictionary[kRootClassCandidateState] integerValue];
    }
    
    if(![dictionary[kRootClassCandidateStateName] isKindOfClass:[NSNull class]]){
        self.candidateStateName = dictionary[kRootClassCandidateStateName];
    }
    if(![dictionary[kRootClassMaxEducation] isKindOfClass:[NSNull class]]){
        self.maxEducation = dictionary[kRootClassMaxEducation];
    }
    if(![dictionary[kRootClassMaxEducationName] isKindOfClass:[NSNull class]]){
        self.maxEducationName = dictionary[kRootClassMaxEducationName];
    }
    if(![dictionary[kRootClassName] isKindOfClass:[NSNull class]]){
        self.name = dictionary[kRootClassName];
    }
    if(![dictionary[kRootClassRegion] isKindOfClass:[NSNull class]]){
        self.region = [dictionary[kRootClassRegion] integerValue];
    }
    
    if(![dictionary[kRootClassRegionName] isKindOfClass:[NSNull class]]){
        self.regionName = dictionary[kRootClassRegionName];
    }
    if(![dictionary[kRootClassResumeId] isKindOfClass:[NSNull class]]){
        self.resumeId = [dictionary[kRootClassResumeId] integerValue];
    }
    
    if(![dictionary[kRootClassSeltDescription] isKindOfClass:[NSNull class]]){
        self.seltDescription = dictionary[kRootClassSeltDescription];
    }
    if(![dictionary[kRootClassSex] isKindOfClass:[NSNull class]]){
        self.sex = dictionary[kRootClassSex];
    }
    if(![dictionary[kRootClassWorkYear] isKindOfClass:[NSNull class]]){
        self.workYear = [dictionary[kRootClassWorkYear] integerValue];
    }
    
    return self;
}

@end
